package com.sky.loveshop.entity.collectMoney;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author xcy
 * @version V1.0
 * @description 终端激活响应结果
 * @date 2024/10/6 23:21
 */
@NoArgsConstructor
@Data
public class ActivateResponse {

    @JsonProperty("result_code")
    private String resultCode;
    @JsonProperty("biz_response")
    private BizResponseDTO bizResponse;

    @NoArgsConstructor
    @Data
    public static class BizResponseDTO {
        /**
         * 终端号
         */
        @JsonProperty("terminal_sn")
        private String terminalSn;

        /**
         * 终端密钥
         */
        @JsonProperty("terminal_key")
        private String terminalKey;
    }

    public Boolean isSuccess() {
        return "200".equals(resultCode);
    }
}
